package com.dks.mapper;

import java.util.*;
import com.dks.models.Diary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface DiaryMapper{

    Integer insert(Diary diary);

    Integer update(Diary diary);

    Integer delete(@Param("id") Integer id);

    Diary select(@Param("id") Integer id);

    Integer cntByMap(Map<String, Object> map);

    List<Integer> getByMap(Map<String, Object> map);

    List<Diary> getByMapList(Map<String, Object> map);

    Integer updateByCode(Diary diary);

    Diary selectByBfCode(@Param("bfCode") String bfCode);

    int updateBrowseCount(Long diaryId);

    Diary selectDiary(Integer diaryId);
}
